package com.atguigu.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * public static final String DEFAULT_PREFIX = "classpath:/templates/";
 * public static final String DEFAULT_SUFFIX = ".html";
 * 只要我们把HTML页面放在classpath:/templates/，thymeleaf就能自动渲染；
 */
@Controller
public class HelloWordController {

    @RequestMapping("/success")
    public String success(Map<String,Object> map){
        map.put("hello","<h1>你好<h1>");
        map.put("users", Arrays.asList("zhangsan","lisi","wangwu"));

        return "success";
    }


}
